Class Flow.Settings
Global engine settings which don't fall into particular category or can't be assigned to a specific object.
Flow.Settings is composed of several sub-tables, and each section of the Flow.Settings documentation corresponds to one of these sub-tables.
These configuration groups are located in settings.lua script file.
It is possible to change settings on a per-level basis via Flow.GetSettings and Flow.SetSettings functions, but keep in mind that
settings.lua is reread every time the level is reloaded. Therefore, you need to implement custom settings management in your level script
if you want to override global settings.
| rootMesh |
Root mesh to which hair object will attach to. |
| offset |
Relative braid offset to a headmesh. |
| indices |
Braid connection indices. |
| errorMode |
How should the application respond to script errors? |
| multithreaded |
Use multithreading in certain calculations. |
| fastReload |
Can the game utilize the fast reload feature? |
These settings determine whether a specific moveset is available in-game.
Usage:
settings.Animations.crouchRoll = true
local settings = TEN.Flow.GetSettings()
settings.Animations.crouchRoll = false
TEN.Flow.SetSettings(settings)
-
crawlExtended
-
Extended crawl moveset.
- crawlExtended
bool
When enabled, player will be able to traverse across one-click steps in crawlspaces.
Default: true.
-
crouchRoll
-
Crouch roll.
- crouchRoll
bool
When enabled, player can perform crawlspace roll by pressing sprint key.
Default: true.
-
crawlspaceSwandive
-
Crawlspace dive.
- crawlspaceSwandive
bool
When enabled, player will be able to swandive into crawlspaces.
Default: true.
-
sprintJump
-
Sprint jump.
- sprintJump
bool
If enabled, player will be able to perform extremely long jump when sprinting.
Default: false.
-
ledgeJumps
-
Ledge jumps.
- ledgeJumps
bool
If this setting is enabled, player will be able to jump upwards while hanging on the ledge.
Default: false.
-
poseTimeout
-
Pose timeout.
- poseTimeout
int
If this setting is larger than 0, idle standing pose animation will be performed after given timeout (in seconds).
Default: 20.
Parameters to customize camera and everything related to it.
Usage:
settings.Camera.binocularLightColor = TEN.Color(255, 0, 255)
settings.Camera.lasersightLightColor = TEN.Color(0, 255, 255)
local settings = TEN.Flow.GetSettings()
settings.Camera.binocularLightColor = TEN.Color(255, 0, 255)
settings.Camera.lasersightLightColor = TEN.Color(0, 255, 255)
TEN.Flow.SetSettings(settings)
-
binocularLightColor
-
Determines highlight color in binocular mode.
- binocularLightColor
Color
Color of highlight, when player presses action. Zero color means there will be no highlight.
Default: TEN.Color(192, 192, 96).
-
lasersightLightColor
-
Determines highlight color in lasersight mode.
- lasersightLightColor
Color
Lasersight highlight color. Zero color means there will be no highlight.
Default: TEN.Color(255, 0, 0).
-
objectCollision
-
Specify whether camera can collide with objects.
- objectCollision
bool
When enabled, camera will collide with moveables and statics. Disable for TR4-like camera behaviour.
Default: true.
These settings change appearance and behaviour of a flare.
Usage:
settings.Flare.color = TEN.Color(255, 128, 0)
settings.Flare.sparks = false
local settings = TEN.Flow.GetSettings()
settings.Flare.color = TEN.Color(255, 128, 0)
settings.Flare.sparks = false
TEN.Flow.SetSettings(settings)
-
color
-
Flare color.
- color
Color
Flare color. Used for sparks and lensflare coloring as well.
Default: TEN.Color(128, 64, 0).
-
offset
-
Muzzle offset.
- offset
Vec3
A relative muzzle offset where light and particle effects originate from.
Default: Vec3(0, 0, 41).
-
range
-
Light range.
- range
int
Flare light radius or range. Represented in "clicks" equal to 256 world units.
Default: 9.
-
timeout
-
Burn timeout.
- timeout
int
Flare burn timeout. Flare will stop working after given timeout (specified in seconds).
Default: 60.
-
pickupCount
-
Default flare pickup count.
- pickupCount
int
Specifies amount of flares that you get when you pick up a box of flares.
Default: 12.
-
lensflareBrightness
-
Lens flare brightness.
- lensflareBrightness
float
Brightness multiplier. Specifies how bright lens flare is in relation to light (on a range from 0 to 1).
Default: 0.5.
-
sparks
-
Toggle spark effect.
- sparks
bool
Spark effect. Determines whether flare generates sparks when burning.
Default: true.
-
smoke
-
Toggle smoke effect.
- smoke
bool
Smoke effect. Determines whether flare generates smoke when burning.
Default: true.
-
muzzleGlow
-
Toggle muzzle glow effect.
- muzzleGlow
bool
Glow effect. Determines whether flare generates glow when burning.
Default: false.
-
flicker
-
Toggle flicker effect.
- flicker
bool
Light and lensflare flickering. When turned off, flare light will be constant.
Default: true.
These settings are used to enable or disable certain gameplay features.
Usage:
settings.Gameplay.enableInventory = false
settings.Gameplay.targetObjectOcclusion = true
local settings = TEN.Flow.GetSettings()
settings.Gameplay.enableInventory = false
settings.Gameplay.targetObjectOcclusion = true
TEN.Flow.SetSettings(settings)
-
enableInventory
-
Enable or disable original linear inventory functionality. Can be used to completely disable inventory handling
or to replace it with custom module, such as ring inventory.
- enableInventory
bool
If false, inventory will not open.
Default: true.
-
killPoisonedEnemies
-
Kill enemies which were poisoned by a crossbow poisoned ammo or by any other means. If disabled, enemy hit points will
reach minimum but will never go to zero. This behaviour replicates original TR4 behaviour.
- killPoisonedEnemies
bool
If false, enemies won't be killed by poison.
Default: true.
-
targetObjectOcclusion
-
Enable target occlusion by moveables and static meshes.
- targetObjectOcclusion
bool
If enabled, player won't be able to target enemies through moveables and static meshes.
Default: true.
These settings are used to enable or disable certain graphics features.
Usage:
settings.Graphics.ambientOcclusion = false
settings.Graphics.skinning = false
local settings = TEN.Flow.GetSettings()
settings.Graphics.ambientOcclusion = false
settings.Graphics.skinning = false
TEN.Flow.SetSettings(settings)
-
ambientOcclusion
-
Enable ambient occlusion.
- ambientOcclusion
bool
If disabled, ambient occlusion setting will be forced to off, and corresponding menu entry in the Display Settings dialog will be grayed out.
Default: true.
-
skinning
-
Enable skinning.
- skinning
bool
If enabled, skinning will be used for animated objects with skinned mesh. Disable to force classic TR workflow.
Default: true.
This is a table of braid object settings.
Table consists of three entries, with first one representing classic Lara braid, and 2 and 3 representing left and right young Lara braids respectively.
Therefore, if you want to access classic Lara braid settings, use settings.Hair[1], and so on.
Usage:
settings.Hair[2].offset = TEN.Vec3(-50, -50, -50)
settings.Hair[3].offset = TEN.Vec3(50, -50, -50)
local settings = TEN.Flow.GetSettings()
settings.Hair[2].offset = TEN.Vec3(-50, -50, -50)
settings.Hair[3].offset = TEN.Vec3(50, -50, -50)
TEN.Flow.SetSettings(settings)
-
rootMesh
-
Root mesh to which hair object will attach to.
- rootMesh
int
Index of a root mesh to which hair will attach. Root mesh may be different for each hair object.
Default: 14.
-
offset
-
Relative braid offset to a headmesh. Not used with skinned hair mesh.
- offset
Vec3
Specifies how braid is positioned in relation to a headmesh.
-
indices
-
Braid connection indices. Not used with skinned hair mesh.
- indices
table
A list of headmesh's vertex connection indices. Each index corresponds to nearest braid rootmesh vertex. Amount of indices is unlimited.
These settings determine visibility of particular in-game HUD elements.
Usage:
settings.Hud.statusBars = false
settings.Hud.pickupNotifier = false
local settings = TEN.Flow.GetSettings()
settings.Hud.statusBars = false
settings.Hud.pickupNotifier = false
-
statusBars
-
Toggle in-game status bars visibility.
- statusBars
bool
If disabled, all status bars (health, air, stamina) will be hidden.
Default: true.
-
loadingBar
-
Toggle loading bar visibility.
- loadingBar
bool
If disabled, loading bar will be invisible in game.
Default: true.
-
speedometer
-
Toggle speedometer visibility.
- speedometer
bool
If disabled, speedometer will be invisible in game.
Default: true.
-
pickupNotifier
-
Toggle pickup notifier visibility.
- pickupNotifier
bool
If disabled, pickup notifier will be invisible in game.
Default: true.
Features and enhancements that modify enemy behaviour during pathfinding and while tracking player and other enemies.
Usage:
settings.Pathfinding.mode = TEN.Flow.PathfindingMode.Dijkstra
settings.Pathfinding.moveableAvoidance = false
local settings = TEN.Flow.GetSettings()
settings.Pathfinding.mode = TEN.Flow.PathfindingMode.Dijkstra
settings.Pathfinding.moveableAvoidance = false
TEN.Flow.SetSettings(settings)
-
mode
-
Pathfinding mode.
-
searchDepth
-
Pathfinding graph search depth.
- searchDepth
int
Specifies how deep the AI will search the pathfinding graph when calculating a path to the target.
Default: 5.
-
escapeDistance
-
Escape distance.
- escapeDistance
int
If enemy is being attacked, it attempts to escape as far as possible from the attacker. This
value specifies the distance the enemy will try to reach when escaping.
Default: 5.
-
stalkDistance
-
Stalk distance.
- stalkDistance
int
Distance at which an enemy may start to track a target without attempting to attack.
Default: 3.
-
predictionFactor
-
Path prediction scale factor.
- predictionFactor
float
Determines how far ahead enemy predicts the target's position based on its
current velocity. A higher value makes enemies intercept the target earlier, while a lower value reduces anticipation.
If set to 0, prediction will be disabled.
Default: 15.0.
-
collisionPenaltyThreshold
-
Collision penalty threshold.
- collisionPenaltyThreshold
float
Specifies the timeout in seconds after which the enemy will be punished for
collisions with illegal geometry and will be forced to ignore its current path to the target and recalculate it.
If set to 0, collision penalties will be disabled.
Default: 1.0.
-
collisionPenaltyCooldown
-
Collision penalty cooldown.
- collisionPenaltyCooldown
float
If a collision penalty was applied to an enemy, this value specifies the timeout
in seconds during which the enemy will ignore the path to the target which previously caused a penalty.
Default: 6.0.
-
moveableAvoidance
-
Moveable avoidance.
- moveableAvoidance
bool
Avoid collisions with moveables when possible. Enemy will attempt to turn away from the
moveable if it's in the way. Applies only to moveables not placed near room geometry.
Default: true.
-
staticMeshAvoidance
-
Static mesh avoidance.
- staticMeshAvoidance
bool
Avoid collisions with static meshes when possible. Enemy will attempt to turn away from the
static mesh if it's in the way. Applies only to static meshes not placed near room geometry.
Default: true.
-
verticalGeometryAvoidance
-
Vertical geometry avoidance for swimming and flying enemies.
- verticalGeometryAvoidance
bool
Avoid swimming or flying forward into illegal room geometry that can be avoided
by moving upwards.
Default: true.
-
waterSurfaceAvoidance
-
Water surface avoidance for swimming and flying enemies.
- waterSurfaceAvoidance
bool
For flying enemies, prevents diving into the water and dying while attacking
the player or other enemies from above. For swimming enemies, adds extra measures to avoid glitching out of the water.
Default: true.
-
verticalMovementSmoothing
-
Vertical movement smoothing for swimming and flying enemies.
- verticalMovementSmoothing
bool
Smooths out vertical movement for swimming and flying enemies to prevent
sudden unnatural jerks or changes in direction.
Default: true.
Here you will find various settings for game world physics.
Usage:
settings.Physics.gravity = 9.81
settings.Physics.swimVelocity = 6.0
local settings = TEN.Flow.GetSettings()
settings.Physics.gravity = 9.81
settings.Physics.swimVelocity = 6.0
TEN.Flow.SetSettings(settings)
-
gravity
-
Global world gravity.
- gravity
float
Specifies global gravity. Mostly affects Lara and several other objects.
Default: 6.0.
-
swimVelocity
-
Swim velocity.
- swimVelocity
float
Specifies swim velocity for Lara. Affects both surface and underwater.
Default: 50.0.
Global system settings that is not directly related to gameplay.
Usage:
settings.System.errorMode = TEN.Flow.ErrorMode.Throw
settings.System.fastReload = false
local settings = TEN.Flow.GetSettings()
settings.System.errorMode = TEN.Flow.ErrorMode.Throw
settings.System.fastReload = false
TEN.Flow.SetSettings(settings)
-
errorMode
-
How should the application respond to script errors?
- errorMode
ErrorMode
Error mode to use.
Default: Flow.ErrorMode.WARN.
-
multithreaded
-
Use multithreading in certain calculations.
When set to true, some performance-critical calculations will be performed in parallel, which can give
a significant performance boost. Don't disable unless you have problems with launching or using TombEngine.
- multithreaded
bool
Determines whether to use multithreading or not.
Default: true.
-
fastReload
-
Can the game utilize the fast reload feature?
When set to true, the game will attempt to perform fast savegame reloading if current level is the same as
the level loaded from the savegame. It will not work if the level timestamp or checksum has changed
(i.e. level was updated). If set to false, this functionality is turned off.
- fastReload
bool
Toggles fast reload on or off.
Default: true.
System-wide user interface settings.
Usage:
settings.UI.titleMenuPosition = TEN.Vec2(400, 300)
settings.UI.headerTextColor = TEN.Color(255, 128, 0)
local settings = TEN.Flow.GetSettings()
settings.UI.titleMenuPosition = TEN.Vec2(400, 300)
settings.UI.headerTextColor = TEN.Color(255, 128, 0)
TEN.Flow.SetSettings(settings)
-
headerTextColor
-
Header text color.
- headerTextColor
Color
A color used for displaying header text in system menus.
Default: TEN.Color(216, 117, 49).
-
optionTextColor
-
Option text color.
- optionTextColor
Color
A color used for displaying option text in system menus.
Default: TEN.Color(240, 220, 32).
-
plainTextColor
-
Plain text color.
- plainTextColor
Color
A color used for displaying plain text in system menus.
Default: TEN.Color(255, 255, 255).
-
disabledTextColor
-
Disabled text color.
- disabledTextColor
Color
A color used for displaying any header text in menus.
Default: TEN.Color(128, 128, 128).
-
shadowTextColor
-
Shadow text color.
- shadowTextColor
Color
A color used for drawing a shadow under any rendered text.
Default: TEN.Color(0, 0, 0).
-
titleLogoPosition
-
Title logo center point position.
- titleLogoPosition
Vec2
Center point of a title level logo position.
Default: TEN.Vec2(50, 20).
-
titleLogoScale
-
Title logo scale.
- titleLogoScale
Vec2
Title level logo scale.
Default: TEN.Vec2(1, 1).
-
titleLogoColor
-
Title logo color.
- titleLogoColor
Color
Title level logo color.
Default: TEN.Color(255, 255, 255).
-
titleMenuPosition
-
Title menu position.
- titleMenuPosition
Vec2
Title level menu position. Horizontal coordinate represents an alignment baseline,
while vertical coordinate represents a first menu entry's vertical position.
Default: TEN.Vec2(50, 66).
-
titleMenuScale
-
Title menu scale.
- titleMenuScale
float
Title level menu scale.
Default: 1.0.
-
titleMenuAlignment
-
Title menu alignment.
This is a table of weapon settings, with several parameters available for every weapon.
Access particular weapon's settings by using
Objects.WeaponType as an index for this table, e.g.
settings.Weapons[Flow.WeaponType.PISTOLS].
Default values for these settings are different for different weapons. Refer to settings.lua file to see them.
Usage:
settings.Weapons[TEN.Objects.WeaponType.PISTOLS].accuracy = 5.0
settings.Weapons[TEN.Objects.WeaponType.PISTOLS].damage = 10
local settings = TEN.Flow.GetSettings()
settings.Weapons[TEN.Objects.WeaponType.PISTOLS].accuracy = 5.0
settings.Weapons[TEN.Objects.WeaponType.PISTOLS].damage = 10
TEN.Flow.SetSettings(settings)
-
accuracy
-
Shooting accuracy.
- accuracy
float
Determines accuracy range in angles (smaller angles mean higher accuracy). Applicable only for firearms.
-
targetingDistance
-
Targeting distance.
- targetingDistance
float
Specifies maximum targeting distance in world units (1 block = 1024 world units) for a given weapon.
-
interval
-
Shooting interval.
- interval
float
Specifies an interval (in frames), after which Lara is able to shoot again. Not applicable for backholster weapons.
-
damage
-
Damage.
- damage
int
Amount of hit points taken for every hit.
-
alternateDamage
-
Alternate damage.
- alternateDamage
int
For crossbow, specifies damage for explosive ammo.
-
waterLevel
-
Water level.
- waterLevel
int
Specifies water depth, at which Lara will put weapons back into holsters, indicating it's not possible to use it in water.
-
pickupCount
-
Default ammo pickup count.
- pickupCount
int
Amount of ammo which is given with every ammo pickup for this weapon.
-
flashColor
-
Gunflash color.
- flashColor
Color
specifies the color of the gunflash.
-
flashRange
-
Gunflash range.
- flashRange
int
specifies the range of the gunflash.
-
flashDuration
-
Gunflash duration.
- flashDuration
int
specifies the duration of a gunflash effect.
-
smoke
-
Gun smoke.
- smoke
bool
if set to true, indicates that weapon emits gun smoke.
-
shell
-
Gun shell.
- shell
bool
If set to true, indicates that weapon emits gun shell. Applicable only for firearms.
-
muzzleFlash
-
Display muzzle flash.
- muzzleFlash
bool
specifies whether muzzle flash should be displayed or not.
-
muzzleGlow
-
Display muzzle glow.
- muzzleGlow
bool
specifies whether muzzle glow should be displayed or not.
-
colorizeMuzzleFlash
-
Colorize muzzle flash.
- colorizeMuzzleFlash
bool
specifies whether muzzle flash should be tinted with the same color as gunflash color.
-
muzzleOffset
-
Muzzle offset.
- muzzleOffset
Vec3
specifies offset for spawning muzzle gunflash effects.